home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Champak 49
/
Volume 49 - JOGO DISK .iso
/
Games
/
feverfrenzy-demo.swf
/
scripts
/
DefineSprite_151
/
frame_1
/
DoAction.as
Wrap
Text File
|
2007-09-28
|
1KB
|
64 lines
function reset()
{
i = 0;
while(i < mLimit)
{
mWaitingArray[i] = null;
i++;
}
}
function arrivePatient(paciente)
{
i = 0;
while(i < mLimit)
{
if(mWaitingArray[i] == null)
{
mWaitingArray[i] = paciente;
var _loc3_ = getPosition(i);
this.localToGlobal(_loc3_);
_parent.globalToLocal(_loc3_);
paciente._x = _loc3_.x;
paciente._y = _loc3_.y;
paciente.esperando();
break;
}
i++;
}
}
function leavePatient(paciente)
{
i = 0;
while(i < mLimit)
{
if(mWaitingArray[i] == paciente)
{
mWaitingArray[i] = null;
}
i++;
}
}
function hasPosition()
{
i = 0;
while(i < mLimit)
{
if(mWaitingArray[i] == null)
{
return true;
}
i++;
}
return false;
}
function getPosition(pos)
{
px = -105 + pos * 48;
var _loc1_ = {x:px,y:0};
return _loc1_;
}
stop();
var mWaitingArray = new Array();
var mLimit = 5;
reset();